home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 March / EnigmA AMIGA RUN 05 (1996)(G.R. Edizioni)(IT)[!][issue 1996-03][Skylink CD IV].iso / earcd / program / wb2argv.lha / WB2Argv.readme < prev   
Text File  |  1996-02-10  |  2KB  |  64 lines

  1. Short:    GNU getopt() <-> Workbench interface
  2. Author:   <jensthi@ifi.uio.no> (Jens T. Berger Thielemann)
  3. Uploader: <jensthi@ifi.uio.no> (Jens T. Berger Thielemann)
  4. Version:  1.0
  5. Type:     dev/c,dev/cross
  6. Requires: Amiga, C compiler, C= includes, OS 2.04+
  7.  
  8. As  C/C++  is  currently  the  only  compilable  languages  worth doing
  9. cross-development  in, I decided to push portability a bit further.  As
  10. many  other  platforms haven't noticed, the computer has a mouse, which
  11. can be utilized for passing options to programs, amongs others.
  12.  
  13. Still,  as  the  Workbench  is  very OS specific; the GNU getopt_long()
  14. routines  are still the programmer's choice if he wishes to easily port
  15. his program.
  16.  
  17. WB2Argv  is  a  set of routines which solve this problem.  They convert
  18. the tooltypes and shift-clicked icons into an argv similar array, which
  19. can   be   passed   directly  onto  getopt_long().   The  getopt()  and
  20. getopt_long()  routines  are included in the archive.  A minor quirk is
  21. that  they  require  that  the  Amiga  has OS 2.04 or higher.  This may
  22. change if there is enough interest for these routines.
  23.  
  24. An  example:   Suppose your program is called "Foo".  The user puts the
  25. following arguments as tooltypes:
  26.  
  27. SPEED=FAST
  28. IQ=HIGH
  29. UNIVERSE=UTOPIA
  30.  
  31. In addition, he shift-clicks the files "dh1:Data" and "dh1:Neural".
  32.  
  33. The routine WB2Argv() will take the WBenchMsg which is passed onto you,
  34. and  convert it to the following array (line shifts indicating separate
  35. array elements):
  36.  
  37. Foo
  38. --speed=FAST
  39. --iq=HIGH
  40. --universe=UTOPIA
  41. --
  42. dh1:Data
  43. dh1:Neural
  44.  
  45. This  is  fully  compliant to the getopt_long() format.  The folding of
  46. options case can be specified via flags (it stops at the `=' sign).
  47.  
  48. As  getopt_long(),  this  is  distributed  under the GNU General Public
  49. License,  with  the  following  addition:   You  must mention that your
  50. program uses my routine in your document.
  51.  
  52. Copyright © 1996 Jens T. Berger Thielemann.
  53.  
  54. To contact the author:
  55.         Jens Berger
  56.         Spektrumvn. 4
  57.         N-0666 Oslo
  58.         Norway
  59.  
  60. Note: These routines were written for one of my other projects, ChkTeX,
  61.       which  may  be  useful  if you're doing serious typesetting using
  62.       LaTeX.  Available on AmiNet as text/tex/chktex.lha.
  63.  
  64.